/*
 * @Author: yuanming
 * @Date: 2024-06-30 08:01:12
 * @LastEditors: yuanming
 * @LastEditTime: 2024-08-27 14:48:05
 * @Description: fileDescription
 */
import { createApp } from 'vue'
import CountTo from 'vue-countup-v3'
import Cookies from 'js-cookie'
import ElementPlus from 'element-plus'

import 'element-plus/dist/index.css'
import locale from 'element-plus/es/locale/lang/zh-cn'
import '@/assets/custom-theme/font.css'

import pluginApi from './api/config'
import App from './App.vue'
import store from './store'
import router from './router'

const app = createApp(App)

app.component('CountTo', CountTo)

app.config.globalProperties.$api = pluginApi
app.use(router)
app.use(store)

// 使用element-plus 并且设置全局的大小
app.use(ElementPlus, {
    locale,
    // 支持 large、default、small
    size: Cookies.get('size') || 'default',
})

app.mount('#app')
